package com.blue.po.workflow;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;

import lombok.Data;

/**
 * 流程任务实例表
 *
 * @author nanjie.chen
 * @email 15696471158@163.com
 * @date 2025-03-07
 */
@Data
@TableName("workflow_task_instance")
public class TaskInstancePO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "流程任务实例ID")
    private String id;

    @Schema(description = "流程实例ID")
    private String instanceId;

    @Schema(description = "当前处理节点ID")
    private String currentNodeId;

    @Schema(description = "实际处理人ID")
    private String assigneeId;

    @Schema(description = "任务状态(0-pending,1-approved,2-rejected,3-back,4-revoked)")
    private String status;

    @Schema(description = "操作时间")
    private String operationTime;

    @Schema(description = "审批意见")
    private String remark;

    @Schema(description = "前序任务ID（用于退回跟踪）")
    private String previousTaskId;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private String createTime;

    @Schema(description = "流程定义名称")
    @TableField(exist = false)
    private String definitionNm;

    @Schema(description = "流程发起人")
    @TableField(exist = false)
    private String initiator;

    @Schema(description = "流程处理人")
    @TableField(exist = false)
    private String assignee;

    @Schema(description = "流程发起时间")
    @TableField(exist = false)
    private String startTime;

    @Schema(description = "停留时间")
    @TableField(exist = false)
    private String retentionTime;



}
